<?php
class Default_IndexController extends Zend_Controller_Action {

	/**
	 * Domyslna akcja
	 * @return void
	 */
	public function indexAction() {
		$config = $this->_helper->config();
		
		/* @var $bootstrap Bootstrap */
		$bootstrap = $this->getInvokeArg('bootstrap');
		/* @var $resource Promotor_Application_Resource_Router */
		$resource = $bootstrap->getPluginResource('Router');

		// dzieki temu dodawany jest przedrostek locale
		$params = $resource->getGlobalParams();
		if (isset($config->params))
		{
			$params = array_merge($params, $config->params->toArray());
		}
		
		$this->_forward($config->action,
						$config->controller,
						$config->module,
						$params);
	}
}